//
// Created by Tony on 2024/6/19.
//

#ifndef RUNTIME_JMP_H
#define RUNTIME_JMP_H

#include "Instruction.h"

namespace Runtime {

class JMP : public BranchInstruction {

public:
    JMP() : BranchInstruction(__func__, OpCode::JMP) {}

    void execute(RtData::Frame& frame) override {
        frame.setNextPC(frame.getNextPC() + mOffset - INSTR_LEN);
    }
};

} // namespace Runtime

#endif // RUNTIME_JMP_H